public class Main1 {
    public static void main(String[] args) {
        obj2 ob1 = new obj2();
        ob1.a = 1;
        obj2 ob2 = new obj2();
        ob2.a = 2;
        new obj1().update(ob1);
        System.out.println(ob1.a);
    }
}

class obj1{
    obj2 objj = new obj2();
    void update(obj2 ob){
        obj2 temp = ob;
        temp.a = 2;     //真的改变了，我的假设和推论成立了！！！！！！！！！！！！！！

    }
}

class obj2{
    int a = 0;
}
